home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / AEWIN100.ARJ / VIEWPORT.CC < prev    next >
C/C++ Source or Header  |  1990-12-27  |  772b  |  31 lines

  1. /**********************************************************************
  2.  *  
  3.  *  NAME:           viewport.cpp
  4.  *  
  5.  *  DESCRIPTION:    methods for viewport
  6.  *  
  7.  *  M O D I F I C A T I O N   H I S T O R Y
  8.  *
  9.  *  when        who                 what
  10.  *  -------------------------------------------------------------------
  11.  *  12/02/90    J. Alan Eldridge    created
  12.  *  
  13.  *********************************************************************/
  14.  
  15. #include    "w.h"
  16.  
  17. //  check if pointing device is in port
  18. //  if so, modify coordinates so they are port relative
  19.  
  20. int
  21. viewport::intheport(
  22.     int &y,
  23.     int &x)
  24. {
  25.     if (y >= yUL && y <= yLR && x >= xUL && x <= xLR) {
  26.         y -= yUL; x-= xUL; return TRUE;
  27.     } else
  28.         return FALSE;
  29. }
  30.  
  31.